﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;


namespace ConfeccionesJR.Entites
{
    public class PROFORMA:BaseEntity
    {
        public PROFORMA()
        {
            DETALLEPROFORMAs = new List<DETALLEPROFORMA>();
            Fecha = DateTime.Now.Date;

        }
        public int Id { get; set; }

        [Display(Name = "clienteId")]
        [Required(ErrorMessage = "El Cliente es requerido")]
        [Range(1, 100000, ErrorMessage = "El Cliente es requerido")]
        public int clienteId { get; set; }

        [Display(Name = "Fecha")]
        [Required(ErrorMessage = "La fecha es requerida")]    
        public DateTime? Fecha { get; set; }

        [Display(Name = "Total")]
        [Required(ErrorMessage = "El Total es requerido")]
        [Range(0.001, 100000, ErrorMessage = "El Total debe ser mayor a 0")]
        public decimal Total { get; set; }

        public string CondicionPago{ get; set; }
        public string Vigencia{ get; set; }
        public string TiempoEntrega{ get; set; }

        public CLIENTE CLIENTE { get; set; }
        public List<DETALLEPROFORMA> DETALLEPROFORMAs { get; set; }
        
        
    }
}
